/*
 * @Author: your name
 * @Date: 2020-11-16 22:05:34
 * @LastEditTime: 2020-11-16 22:14:41
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \movie\middleware\checkLogin.js
 */
//用户防翻墙中间件
module.exports = ( req, res, next ) =>{ 
  if ( !req.session[ 'username' ] ) {
    res.redirect( '/admin/login' );
  } else { 
    next();
  }
}
